package com.unicom.office.node;

import com.unicom.office.func.FuncCommon;
import com.unicom.office.type.DocumentTypeItem;
import com.unicom.office.type.SectionTypeItem;
import com.unicom.office.type.TypeItem;
import com.unicom.office.unit.DocumentUnit;
import com.unicom.office.unit.OfficeUnit;

public class DocumentNode extends RootNode {
    public DocumentNode(Object source) {
        super(source);
    }

    public OfficeUnit createUnit() {
        return new DocumentUnit();
    }

    public boolean testChildType(FuncCommon child) {
        return child.getType() == SectionTypeItem.INSTANCE;
    }

    public TypeItem getType() {
        return DocumentTypeItem.INSTANCE;
    }
}
